<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSysAccountMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sys_account_menus', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('sys_account_id')->default('0')->comment('');
            $table->integer('parent_id')->default('0')->comment('父结点');
            $table->integer('order')->default('0')->comment('排序');
            $table->string('title')->default('')->comment('名称');
            $table->string('type')->default('')->nullable()->comment('类型');
            $table->string('url')->default('')->nullable()->comment('链接');
            $table->string('bakurl')->default('')->nullable()->comment('备用链接');
            $table->string('appid')->default('')->nullable()->comment('appid');
            $table->string('pagepath')->default('')->nullable()->comment('路径');
            $table->string('key')->default('')->nullable()->comment('关键字');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sys_account_menus');
    }
}
